Skip to content

ci: migrate build artifact handoff from cache to artifacts#5740

Merged
avallete merged 1 commit into
developfrom
claude/supabase-cli-workflow-38cted
Jun 30, 2026
Merged

ci: migrate build artifact handoff from cache to artifacts#5740
avallete merged 1 commit into
developfrom
claude/supabase-cli-workflow-38cted

Conversation

@avallete

Copy link
Copy Markdown
Member

Replace GitHub Actions cache with artifacts for passing build outputs between jobs in the release workflow. This improves reliability by using run-scoped artifacts with deterministic retention instead of a shared 10 GB cache budget that can be evicted LRU mid-run.

Key changes:

  • build-cli-artifacts.yml: Replace actions/cache/save with actions/upload-artifact to hand off compiled binaries and dist files to downstream jobs. Artifacts are configured with 1-day retention, light compression (binaries already compressed), and overwrite enabled for job re-runs.

  • release-shared.yml: Replace all actions/cache/restore calls with actions/download-artifact in publish, publish-homebrew, and publish-scoop jobs. Update artifact names to match the new naming scheme (cli-build-{shell}-{version}{suffix}).

  • build-cli-artifacts.yml: Rename cache_key_suffix input to artifact_name_suffix for clarity.

  • release-shared.yml: Add missing binary permission fix step in the npm-publish job (chmod +x on compiled binaries) to match the pattern used in other publish jobs, since artifacts don't preserve Unix permissions.

  • publish-preview-cli-packages.yml: Update preview build artifact retrieval to use actions/download-artifact.

This change eliminates the risk of cache eviction between the build producer and downstream consumers while simplifying the artifact naming and handoff logic.

https://claude.ai/code/session_012AkD2XxUdcrBLH58fQr7yi

The publish job (and smoke/brew/scoop/preview consumers) pulled the
compiled binaries + dist/ from a run-scoped GitHub Actions cache keyed
by run_id, restored with fail-on-cache-miss. Caches share a 10 GB
per-repo budget and are evicted LRU, so a large build cache can vanish
mid-run between the producer and a later consumer — which is exactly
what broke release v2.109.0: the cache restored fine for an early
consumer, then was gone by the time publish ran, and the run_id-keyed
cache could not be regenerated on re-run because the producer job was
not re-executed.

Replace the cache handoff with actions/upload-artifact /
download-artifact. Artifacts have deterministic retention (set to 1 day
for this intra-run handoff), survive job re-runs within the run, and are
not subject to the cache LRU. Since artifacts drop the Unix executable
bit, add a chmod +x in the publish job before it ships
packages/cli-*/bin/supabase to npm (smoke and preview jobs already
chmod). Rename the producer's cache_key_suffix input to
artifact_name_suffix to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012AkD2XxUdcrBLH58fQr7yi
@avallete avallete enabled auto-merge June 30, 2026 16:27
@github-actions

Copy link
Copy Markdown

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@7b3a48271bc9350fe700dc50f6f3e15043f1915c

Preview package for commit 7b3a482.

@avallete avallete added this pull request to the merge queue Jun 30, 2026
Merged via the queue into develop with commit 49db006 Jun 30, 2026
19 checks passed
@avallete avallete deleted the claude/supabase-cli-workflow-38cted branch June 30, 2026 16:34
pull Bot pushed a commit to oogalieboogalie/cli that referenced this pull request Jul 1, 2026
## Summary

Reverts the release workflow handoff from uploaded artifacts back to
`actions/cache` now that the repository has more GitHub cache capacity.

This restores the previous run-scoped cache keys for CLI build outputs
across smoke, publish, Homebrew, Scoop, and preview-package jobs while
keeping the newer pinned `actions/cache` version from the dependency
bump.

Reverts supabase#5740
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants